package com.qishon.jdk5;

import java.util.Arrays;
import java.util.List;

public class ForEach {

    public static void main(String[] args) {

        int[] arr = {1, 4, 5, 7};

        for (int i : arr) {
            System.out.println(i);
        }

        List<String> names = Arrays.asList("张三", "李四", "王五", "赵六", "田七", "王八");
        for (String name : names) {
            System.out.println(name);
        }
    }
}